FROM nginx
MAINTAINER "Ice Lee"
# Setting time zone
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

# Nginx config path root
ENV NGINX_PATH=/etc/nginx
# Conf Supper path
ENV NGINX_CONF_PATH=${NGINX_PATH}/conf.d
# Default config file for nginx
ENV NGINX_CONF_FILE=default.conf

COPY ./${NGINX_CONF_FILE} ${NGINX_CONF_PATH}/${NGINX_CONF_FILE}
RUN chmod a+r ${NGINX_CONF_PATH}/${NGINX_CONF_FILE}

RUN mkdir -p ${NGINX_PATH}/ssl

COPY ./ssl/nginx.crt ${NGINX_PATH}/ssl
COPY ./ssl/nginx.key ${NGINX_PATH}/ssl

EXPOSE 80 443

VOLUME [ "/var/log/nginx","/usr/share/nginx/html" ]